#include <iostream>
#include <windows.h>
#include <utility>

using namespace std;

//  一亿次加减
pair<double, double> YyFloat64AddSub(double N1, double N2) {
    for (int i = 1; i <= 100000000; i++) {
        N1+=3.14;
        N2-=3.14;
    }
    return make_pair(N1, N2);
}

int main() {
    std::cout << std::fixed;   // 浮点类型按照小数格式输出，不自动转为 e 格式
    
    DWORD startSec = GetTickCount();
    pair<double, double> p1;
    for (int i = 1; i <= 10; i++) {
        p1 = YyFloat64AddSub(0, 314159265);
    }
    cout << " 单次平均耗时(ms)：" << (GetTickCount() - startSec) / 10 << " ,元祖结果:(" << p1.first<< ", " << p1.second<< ")" << endl;
    return 0;
}